//滚动的时候判断显示或者隐藏
import { onMounted } from 'vue'
export const isShow = (dom: string, type: number = 0) => {
  onMounted(() => {
    const content = document.querySelector(`.${dom}`) as HTMLDivElement
    window.addEventListener('scroll', function () {
      this.scrollY === type
        ? ((content.style as any) = '  opacity:1;transition: 1s;')
        : ((content.style as any) = ' opacity: 0;transition: 1s;')
    })
  })
}
